package com.qf.blog.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qf.blog.entity.Message;
import com.qf.blog.mapper.MessageMapper;
import com.qf.blog.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;

/**
 * User: key
 * ClassName:MessageServiceImpl
 * Date: 2023/6/10
 * Time: 13:43
 * description:
 */
@Service
public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> implements MessageService {

    @Autowired
    private MessageMapper messageMapper;
    @Override
    public Integer insertOnFollow(Message message) {
        return messageMapper.insertOnFollow(message);
    }

    @Override
    public Integer updateOnFollow(Message message) {
        return messageMapper.updateOnFollow(message);
    }

    @Override
    public Message selectByToAndFrom(Integer toId, Integer fromId) {
        return messageMapper.selectByToAndFrom(toId,fromId);
    }

}
